<?php
$isadmin=1;
include "../../comm/config.php";
include "../../comm/checkpostandget.php";
include "../check.php";
$id=$_GET["id"]; 
$link = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$link) {
	die("数据库链接出错: " . mysql_error());
}
else
{
	mysql_query("set names utf8");
	$sql="select * from ".$BIAOTOU."malltype where id=".$id;
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	 while ($row = mysql_fetch_array($rs))
	{
		$typename=$row['typename'];
		$typecode=$row['typecode'];
		$wz=$row['sort'];
	}
}
mysql_close($link);	
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript">	
function tSubmit(form){
	if(form.typename.value==''){
		alert('请填写类别名称！');
		form.typename.focus();
		return false;
	}
	if(form.typecode.value==''){
		alert('请填写类别代码！');
		form.typecode.focus();
		return false;
	}
	if(form.wz.value==''){
		alert('请填写显示位置！');
		form.wz.focus();
		return false;
	}
	return true;
}
</script>
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
.STYLE2 {
	color: #555555;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
-->
</style>
</head>

<body topmargin="5" leftmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="282" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table cellspacing="0" width="100%" height="207" style="border:1px  solid #DCEAF7;">
            <tr>
              <td height="30" colspan="2" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;<img src="../images/arrow.gif" width="16" height="22" align="absmiddle" /> 修改商城类别</strong></td>
            </tr>
            <tr>
              <td width="100%" colspan="2" valign="top"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><form id="form1" name="form1" method="post" action="mall_type_change_save.php" onsubmit="return tSubmit(this);">
<br />
<table width="720"  align="center" border=1 cellpadding=0 cellspacing=0
style="border-collapse: collapse" bordercolor="#dddddd">
                      <tr>
                        <td width="131" height="30" align="right" class="bigtext">类别名称：</td>
                        <td height="30">&nbsp;<input type="text" name="typename" class="btn3" value="<?=$typename?>" style="width:200px;" />
                       </td>
                      </tr>
					   <tr>
                        <td height="30" align="right" class="bigtext">类别代码：</td>
                        <td height="30">&nbsp;<input type="text" name="typecode" class="btn3" value="<?=$typecode?>" style="width:200px;" /></td>
                      </tr>
					  <tr>
                        <td height="30" align="right" class="bigtext">显示位置：</td>
                        <td height="30" class="bigtext">&nbsp;<input type="text" name="wz" class="btn3" value="<?=$wz?>" style="width:100px;" />
                        （只能填数字）</td>
                      </tr>
					   <tr>
                        <td height="30" align="center" class="bigtext">&nbsp;</td>
                        <td height="30" class="bigtext">&nbsp;<input type="submit" name="Submit" value=" 修改商城类别 " />
                        <input name="id" type="hidden" value="<?=$id?>" /><input name="oldtypecode" type="hidden" value="<?=$typecode?>" /></td>
					   </tr>
                    </table>
                                    <br />
                  </form>
                  </td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>

</body>
</html>